* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

button {
    width: 200px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    background: transparent;
    position: relative;
    /* border: solid 2px black; */
    border: none;
    border-radius: 5px;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 250%;
    height: 250%;
    left: 50%;
    top: 50%;
    background-color: red;
    animation: animate 4s linear infinite;
    z-index: -2;
    transform-origin: left top;
    border: none;
}

button::after {
    content: '';
    position: absolute;
    inset: 4px;
    background-color: skyblue;
    border-radius: 5px;
    z-index: -1;
    border: none;
}

@keyframes animate {
    to {
        transform: rotate(360deg);
    }
}